function ajax(){
	var aj = new Object();
	aj.createXmlHttpRequest = function(){
		if (window.ActiveXObject) {
			return new ActiveXObject("Microsoft.XMLHTTP");
		} else if (window.XMLHttpRequest) {
			return new XMLHttpRequest();
		}
	}
	aj.getHttp = function(url,type,fun){
		var httpRequest = aj.createXmlHttpRequest();
		httpRequest.open("GET",url,true);
		httpRequest.onreadystatechange = function() {
			if (httpRequest.readyState == 4 && httpRequest.status == 200) {
				if(type == 'text'){
					if(httpRequest.responseText) fun(httpRequest.responseText);
				}else if(type == 'xml'){
					if(httpRequest.responseXML) fun(httpRequest.responseXML);
				}
			}
		}
		httpRequest.send(null);
	}
	return aj;
}